Skip to content

Conversation

adamof
Copy link

@adamof adamof commented Aug 15, 2025

Fixes #406

Adds the ability to stop the formatter from splitting empty hashes {} over multiple lines by introducing compact_empty_hash plugin.

Before formatting:

{ very_long_key_name_that_might_cause_issues: {}, another_very_long_key_name: {}, yet_another_key: {} }

After formatting without the plugin

{
  very_long_key_name_that_might_cause_issues: {
  },
  another_very_long_key_name: {
  },
  yet_another_key: {
  }
}

After formatting with the plugin

{
  very_long_key_name_that_might_cause_issues: {},
  another_very_long_key_name: {},
  yet_another_key: {}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Empty hash literal should be kept on one line
1 participant